package rsj.sql;

import com.rlyy.aibase.utils.base.TableNode;
import rsj.annotation.Param;
import rsj.annotation.Select;

import java.util.List;

/**
 * 分类查询产品-整合库、自研类-dao
 *
 * @author yuanqinglong
 * @since 2021/5/25 17:02
 */
public interface ProductCategoryQueryDao {


    /**
     * 查询产品的测试类别
     *
     * @param orgId     org id
     * @param category  类别1
     * @param staStatus sta状态
     * @return {@link TableNode}
     */
    @Select("SELECT prod_name,prod_id FROM sys.sys_status LEFT JOIN sys.sys_prod ON prod_id = sta_prod_id WHERE sta_org_id = #{orgId}" +
            " AND prod_test_type = #{category} AND sta_status IN (#{staStatus})")
    TableNode queryProductByTestCategory(@Param("orgId") String orgId, @Param("category") String category, @Param("staStatus") List<String> staStatus);
}
